<template>
  <div class="hello">
    <h2>东软云医院HIS系统</h2>
    <!-- <div>{{msg}}</div> -->

    <el-table
          :data="msg"
          style="width: 100%">
          <el-table-column
            prop="deptCode"
            label="科室编码"
            width="180">
          </el-table-column>
          <el-table-column
            prop="deptName"
            label="科室名称"
            width="180">
          </el-table-column>
          <el-table-column
            prop="deptCateId"
            label="科室分类">
          </el-table-column>
    </el-table>

    <el-button @click="submitClick">测试</el-button>
   </div>

</template>

<script>
export default {
  name: 'HelloWorld',
  mounted:function(){
    //this.submitClick();
  },
  data () {
    return {
      msg: [
        {
         deptCodeL:'',
         deptName:'',
         deptCateId:''
        }
      ],

    }
  },
  methods:{
    submitClick(){
      let _this = this;
      alert("您好，欢迎进行测试！")
      this.$axios.get("/neuhis/user/toadd")
      .then(response =>{
        _this.msg = response.data.deptList;
      });
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
